package com.example.shop.service.impl;

import com.example.common.service.ImageManage;
import com.example.shop.mapper.GoodsImageMapper;
import com.example.shop.service.GoodsImageService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author qwert
 * @version 1.0.0
 * @create 2025/9/4 21:26
 **/
@Service
@RequiredArgsConstructor
public class GoodsImageServiceImpl implements GoodsImageService {
    private final GoodsImageMapper goodsImageMapper;
    private final ImageManage imageManage;
    @Override
    public List<String> queryGoodsImages(String goodsId, String type) {
        List<String> fileIds = goodsImageMapper.queryGoodsImage(goodsId, type);
        return imageManage.getImageUrlList(fileIds);
    }
}
